package com.gss.armory.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.validator.constraints.NotBlank;



import com.gss.common.domain.CommonDetailsDTO;

@Entity
@Table(name="DOCUMENT_WORKFLOW_DETAILS")
public class DocumentWorkflowDetailsDTO extends CommonDetailsDTO implements IDocument ,Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public enum WorkflowStatus {
		PFS, //Pending for Submission
		PFR, //Pending for Reveiw
		PFA, //Pending for approval
		PFRS, //Pending for RE Submission
		PFRR, //Pending for RE Reveiw
		PFRA, //Pending for  RE approval
		TBR, // To be Renewed
		PFRW, // pending for renewal
	}
	public enum WorkflowEventStatus {OPEN,CLOSED,SUSPENDED}
	
	private long wfId;
	private long docId;
	private WorkflowStatus wfStatus;
	private WorkflowEventStatus wfEventStatus;
	private String wfAssignedUser;
	@NotBlank
	private String remarks;
	private String creatorRemarks;
	private String docName;
	
	
	@Column(name="DFD_CREATOR_REMARKS",length=501)
	public String getCreatorRemarks() {
		return creatorRemarks;
	}
	
	@Column (name = "DFD_DOCUMENT_NAME")
	public String getDocName() {
		return docName;
	}
	public void setDocName(String docName) {
		this.docName = docName;
	}
	@Column (name = "DFD_REMARKS")
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column (name = "DFD_ID")
	public long getWfId() {
		return wfId;
	}
	public void setWfId(long wfId) {
		this.wfId = wfId;
	}

	@Column (name = "DFD_DOCUMENT_ID")
	public long getDocId() {
		return docId;
	}
	public void setDocId(long docId) {
		this.docId = docId;
	}
	@Column (name = "DFD_WORKFLOW_STATUS")
	@Enumerated(value=EnumType.STRING)
	public WorkflowStatus getWfStatus() {
		return wfStatus;
	}
	public void setWfStatus(WorkflowStatus wfStatus) {
		this.wfStatus = wfStatus;
	}
	@Column (name = "DFD_WORKFLOW_EVENT_STATUS")
	@Enumerated(value=EnumType.STRING)
	public WorkflowEventStatus getWfEventStatus() {
		return wfEventStatus;
	}
	public void setWfEventStatus(WorkflowEventStatus wfEventStatus) {
		this.wfEventStatus = wfEventStatus;
	}
	
	@Column (name = "DFD_ASSIGNED_USER")
	public String getWfAssignedUser() {
		return wfAssignedUser;
	}
	public void setWfAssignedUser(String wfAssignedUser) {
		this.wfAssignedUser = wfAssignedUser;
	}
	
	public void setCreatorRemarks(String creatorRemarks) {
		this.creatorRemarks = creatorRemarks;
	}
	
	
}
